/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

/**
 * 业务员管理菜单
 *  */
// eslint-disable-next-line import/no-extraneous-dependencies
import { Request, Response } from 'express';
import Mock from 'mockjs';

export default {
  'POST /Inn/getWindDeviceList': (req: Request, res: Response) => {
    return res.send(
      Mock.mock({
        code: 0,
        data: {
          cnt: 103,
          'list|10': [
            {
              id: '@id',
              phone: /^1[0-9]{10}/,
              admin_phone: /^1[0-9]{10}/,
              imei: '525df5c1-06dc-30b2-8cc9-1ccbc5eb29e3',
              ip: '39.144.92.44',
              client_gps: '{"lat":40.280597,"lng":111.190305}',
              create_at: '2023-08-04 17:38:35',
              update_at: '2023-08-04 17:38:35',
              cm_id: '3179040',
              inn_name: '@ctitle',
              concat_location: '云中雅苑小区',
              login_loc: '云中雅苑小区',
            },
          ],
        },
      }),
    );
  },
  'POST /Inn/getLatelyLogin': (req: Request, res: Response) => {
    return res.send(
      Mock.mock({
        code: 0,
        'data|10': [
          {
            username: '18217690146',
            amap_lng: '0',
            amap_lat: '0',
            device_id: '86b04782-3b29-3931-98b1-d5e5c76ee06b',
            time: '2023-08-07 16:02:35',
            range: 0,
            imei: '86b04782-3b29-3931-98b1-d5e5c76ee06b',
            area: '',
          },
        ],
      }),
    );
  },
  'POST /Inn/getLatelyLoginByImei': (req: Request, res: Response) => {
    return res.send(
      Mock.mock({
        code: 0,
        'data|10': [
          {
            username: /^1[0-9]{10}/,
            imei: '525df5c1-06dc-30b2-8cc9-1ccbc5eb29e3',
            range: 80,
            area: '上海 长宁',
            time: '2023-08-04 17:38:35',
            login_area: '的角度讲',
            login_range: '80',
          },
        ],
      }),
    );
  },
  'POST /Inn/ignore': (req: Request, res: Response) => {
    return res.send(
      Mock.mock({
        code: 0,
        data: {},
      }),
    );
  },
  'POST /Inn/unfreeze': (req: Request, res: Response) => {
    return res.send(
      Mock.mock({
        code: 0,
        data: {},
      }),
    );
  },
};
